package com.example.service;

import com.example.entity.AdminNotice;
import com.example.mapper.NoticeMapper;
import com.mysql.cj.protocol.x.Notice;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class NoticeService {
    @Resource
    NoticeMapper noticeMapper;
    public List<AdminNotice> getAll(AdminNotice adminNotice) {
        List<AdminNotice> noticeList = noticeMapper.getAll(adminNotice);
        return noticeList;
    }

    public void add(AdminNotice adminNotice) {
        noticeMapper.add(adminNotice);
    }

    public void update(AdminNotice adminNotice) {
        noticeMapper.update(adminNotice);
    }

    public void delete(Integer id) {
        noticeMapper.deleteById(id);
    }
}
